package cc.lzmsh.controller;

import cc.lzmsh.domain.result.Result;
import cc.lzmsh.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * Author:   msh
 * Date:     2024/9/23 下午2:08
 * Description:
 */

@RestController
public class UploadController {
    @Autowired
    private UploadService uploadService;

    @PostMapping("/upload")
    public Result uploadImg(MultipartFile file) {
        return uploadService.uploadImg(file);
    }
}
